<!DOCTYPE html>
<html lang="zh">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>05 demo3</title>
</head>

<body>
    <h1>Change 事件</h1>
    <input type="text" id="email">
    <p>tips：输入完毕后，取消焦点，出现 alert 效果</p>

    <script>
        var email = document.getElementById("email");
        email.onchange = function (e) {
            alert(e.target.value);
        }
    </script>

</body>

</html>